#!/usr/bin/env.python
# _*_ coding:utf-8 _*_
# # # # # # # # # # # # # # # # # # # #
#  题目:      goods商品路由            #
#  姓名:         李吉辉                #
#  时间:    2018年12月29日00:11:14     #
# # # # # # # # # # # # # # # # # # # #

from django.conf.urls import url
from rest_framework.routers import DefaultRouter

from . import views

urlpatterns = [
    # 商品列表
    url(r'^categories/(?P<category_id>\d+)/skus/', views.SKUListView.as_view()),
]

#  全文检索 第八步: 创建搜索路由器
router = DefaultRouter()
router.register('skus/search', views.SKUSearchViewSet, base_name='skus_search')

urlpatterns += router.urls


#  全文检索 第九步: 测试地址
# http://api.meiduo.site:8000/skus/search/?page=3&text=iPhone